import request from '@/utils/request'

// 查询小组成员列表
export function listGroupMembers(query:any) {
  return request({
    url: '/system/groupMembers/list',
    method: 'get',
    params: query
  })
}

// 查询小组成员详细
export function getGroupMembers(GroupMemberID:any) {
  return request({
    url: '/system/groupMembers/' + GroupMemberID,
    method: 'get'
  })
}

// 新增小组成员
export function addGroupMembers(data:any) {
  return request({
    url: '/system/groupMembers',
    method: 'post',
    data: data
  })
}

// 修改小组成员
export function updateGroupMembers(data:any) {
  return request({
    url: '/system/groupMembers',
    method: 'put',
    data: data
  })
}

// 删除小组成员
export function delGroupMembers(GroupMemberID:any) {
  return request({
    url: '/system/groupMembers/' + GroupMemberID,
    method: 'delete'
  })
}

// 查询未加入小组成员列表
export function NotGroupMembers(query:any) {
  return request({
    url: '/system/groupMembers/NotGroupMembers',
    method: 'get',
    params: query
  })
}

// 管理员添加小组成员
export function AddGroupMembersByAdmin(data:any) {
  return request({
    url: '/system/groupMembers/AddGroupMembersByAdmin',
    method: 'post',
    data: data
  })
}

//excel文件导出
export function exportGroupMembers(data: any) {
  return request({
    url: '/system/groupMembers/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}
